package com.xingshentech.ugv.operate.module.httpdata;

import com.google.gson.JsonObject;
import com.xingshentech.ugv.operate.module.bean.CenterRequest;
import com.xingshentech.ugv.operate.module.bean2.AllVehiclePositionBean;
import com.xingshentech.ugv.operate.module.bean2.AppMenu;
import com.xingshentech.ugv.operate.module.bean2.BaseResponseCenter;
import com.xingshentech.ugv.operate.module.bean2.CarListBean;
import com.xingshentech.ugv.operate.module.bean2.CurrentStationInfo;
import com.xingshentech.ugv.operate.module.bean2.PageResult;
import com.xingshentech.ugv.operate.module.bean2.UserBean;
import com.xstech.library.rxjavahttp.ApiAddress;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface CenterApi {
    /**
     * 登录
     */
    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:center"})
    @POST(ApiAddress.mainRoute)
    Observable<BaseResponseCenter<UserBean>> login(@Body JsonObject params);

    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:center"})
    @POST(ApiAddress.mainRoute)
    Observable<BaseResponseCenter<List<AppMenu>>> getAppMenu(@Body JsonObject params);

    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:center"})
    @POST(ApiAddress.mainRoute)
    Observable<BaseResponseCenter<PageResult<List<CarListBean>>>> getVehicle(@Body JsonObject params);

    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:center"})
    @POST(ApiAddress.mainRoute)
    Observable<BaseResponseCenter<List<CurrentStationInfo>>> getSiteInfo(@Body JsonObject params);

    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:center"})
    @POST(ApiAddress.mainRoute)
    Observable<BaseResponseCenter<Boolean>> deviceControl(@Body CenterRequest params);

    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:center"})
    @POST(ApiAddress.mainRoute)
    Observable<BaseResponseCenter<List<AllVehiclePositionBean>>> getAllVehiclePosition(@Body JsonObject params);

    /**
     * push  app订阅推送相关消息
     */
    String push = "push";
    @Headers({"Content-Type: application/json", "Accept: application/json", "urlName:" + push})
    @GET(ApiAddress.monitor_siteInfo)
    Observable<BaseResponseCenter<Object>> monitor_siteInfo(); //监控平台缓存了站点和车辆的权限，不调用就不会缓存 ，订阅就报错,不用传参 ，不用管返回值


}
